package com.thread.www;

/**
 * @author 新技术软件：汪洋
 */
public class Singleton2 {
    private static Singleton2  instance;
    private static byte[] lock = new byte[0];
    private Singleton2(){}
    public static Singleton2 getInstance(){
        if(instance==null){
            synchronized (lock){
                if(instance==null){
                    instance = new Singleton2();
                }
            }
        }
        return instance;
    }
}
